//
//  HLEDownLoadResponse.m
//  HLENetwork_Example
//
//  Created by hle1879 on 2020/10/10.
//  Copyright © 2020 13434436448@163.com. All rights reserved.
//

#import "HLEDownLoadResponse.h"

@implementation HLEDownLoadResponse

- (instancetype)initWithResponse:(NSURLResponse * _Nullable)response responseObject:(id _Nullable)responseObject filePath:(NSURL * _Nullable)filePath error:(NSError * _Nullable)error{
    self = [super initWithResponse:response responseObject:responseObject error:error];
    if (self) {
        self.filePath = filePath;
    }
    return self;
}

- (void)encodeWithCoder:(nonnull NSCoder *)coder {
    [super encodeWithCoder:coder];
    [coder encodeBool:_filePath forKey:@"filePath"];
}

- (nullable instancetype)initWithCoder:(nonnull NSCoder *)coder {
    if (self = [super initWithCoder:coder]) {
        _filePath = [coder decodeObjectForKey:@"filePath"];
    }
    return self;
}
@end
